package com.tree.service.impl;

import com.alibaba.fastjson.JSON;
import com.tree.dao.MenuMapper;
import com.tree.entity.Menu;
import com.tree.service.MenuService;
import com.tree.util.TreeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
@Service
public class MenuServiceImpl implements MenuService {

    @Autowired(required = false)
    private MenuMapper menuMapper;

    @Override
    public List<Menu> QueryAllMenus() {
        return menuMapper.QueryAllMenus();
    }

    @Override
    public void addNodes(Menu menu) {
        menuMapper.addNodes(menu);
    }

    @Override
    public void deleteNodes(String id) {
        menuMapper.deleteNodes(id);
    }

    @Override
    public void updateNodes(String id, String title) {
        menuMapper.updateNodes(id,title);
    }
}
